home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / hptex / dochc.tex (.txt) < prev    next >
LaTeX Document  |  1992-08-26  |  39KB  |  622 lines

  1. % FILE DOCHC
  2. %    *** Source for hardcopy of Documentation for HP TeX Macros ***
  3. %                Copyright 1984 Hewlett-Packard Co.
  4. \catcode`@=11
  5. \def\itemlist#1{\medskip\resetsubitems\itemset@\@ne\@ne{#1}}
  6. \def\itempar{\smallskip\itemset@\@ne\@ne\empty} \catcode`@=12
  7. \def\spacechar{\hskip1pt\lower3pt\vbox{ \hbox to 5pt
  8.                  {\vrule height4pt width.009in \hfill
  9.                   \vrule height4pt width.009in} \hrule depth.009in
  10.                   height0pt}\hskip2pt}
  11. \def\langle{$\mathchar"4268$}
  12. \def\rangle{$\mathchar"5269$}
  13. \def\evenheading{\vbox{\hbox to \hsize{\eightrm Page \folio\hfil\HPTEX}
  14.                         \nointerlineskip\vskip2pt
  15.                         \hbox{\vrule width \hsize height .4pt}}}
  16. \def\oddheading{\vbox{\hbox to \hsize{\eightrm Documentation\hfil Page \folio}
  17.                         \nointerlineskip\vskip2pt
  18.                         \hbox{\vrule width \hsize height .4pt}}}
  19. \def\noheading{\hfil}
  20. \headline{\ifnum\pageno=1\noheading
  21.               \else\ifodd\pageno\oddheading\else\evenheading\fi\fi}
  22. \def\NOTE#1:{\itemlist{\hbox to .7in{NOTE\hfil#1}:}}
  23. \def\\{$\backslash$}
  24. \parindent.825in
  25. \parskip5pt
  26. \nopagenumbers
  27. \inset=.825in
  28. \def\section#1{\relax}
  29. \null
  30. \vskip.75in
  31. \centerline{\twelvebf DOCUMENTATION FOR \HPTEX\ MACROS}\footnote{}{\hskip-.76in
  32.                                  \eightrm\copyright 1984 Hewlett-Packard Co.}
  33. \smallskip
  34. \centerline{version A.00.00, Feb. 14, 1984.}
  35. \vskip1in
  36. \NOTE   1: PLAIN is read in as a separate file.
  37. \NOTE   2: ``@'' temporarily becomes a letter so that \HPTEX\  can use the
  38.           internal control sequences of PLAIN, and to avoid conflict between
  39.           the internal control sequences of \HPTEX\  and user names.
  40. \NOTE   3: This defines leaders used in the table of contents macros.
  41. \section{FONTS}
  42. \NOTE   4: \HPTEX\  has fonts available in sizes from 5 points to 24 points. The
  43.           fonts loaded in Plain are listed as comments to make it easier to
  44.           verify the fonts available.
  45. \NOTE   5: In case a font is used in a write or message.
  46. \NOTE   6: \\fontdef\#1\#2 defines the control sequence for the font, but the
  47.           font is not loaded until the first time the control sequence is
  48.           actually used. The first parameter is the control sequence to be
  49.           defined; the second is the external font name.
  50. \section{MACROS TO SET FSTYLE}
  51. \NOTE   7: These macros set the family and the background style.  Then, using
  52.           \\setfont, they set the current font.
  53. \section{MACROS TO SET FSIZE}
  54. \NOTE   8: These macros set the background font size, and then use \\setfont to
  55.           set the current font.  \\baselineskip and \\strutbox are set to
  56.           values appropriate to the font size.  The fonts in families 0, 1,
  57.           and 2 are changed to appropriate sizes.  The fonts that are not
  58.           already loaded, are not loaded unless they are needed by an entry
  59.           into either math mode or display mode.
  60. \section{MACROS TO SET CURRENT FONT USING FSTYLE AND FSIZE}
  61. \NOTE   9: \\tryfont\#1 sets \\nofont@ to true if the control sequence determine
  62.           by the current background font size and style (\#1) has not yet been
  63.           defined.  If the control sequence does exist, \\nofont@ is set to
  64.           false, and the control sequence is invoked.
  65. \NOTE  10: \\setfont uses \\tryfont to set the current font based on the
  66.           background font size and style.  If there is no control sequence
  67.           defined for that font, then \\tryfont is used again to check for a
  68.           font with the background size and in roman style.  If there is
  69.           still no control sequence defined for that font, the size ten and
  70.           style roman is tried.  This will always succeed in \HPTEX.
  71.           \itempar\\{f}fam will be a third factor in determining the current
  72.           font when other font families become available.
  73. \section{DEFAULTS}
  74. \NOTE  11: The default values in \HPTEX\  are family0 and font \\tenrm, with a
  75.           background style of roman, a background size of ten points, and a
  76.           superscript/subscript size of seven points.
  77. \section{LINE MACROS}
  78. \NOTE  12: These line setting macros take \\leftskip and \\rightskip into
  79.           account.
  80. \section{MORE MACROS}
  81. \NOTE  13: This replaces Knuth's definition of \\narrower.  \\narrow@ is used in
  82.           the note and warning macros.
  83. \NOTE  14: \\need is followed by a dimension x.  It uses \\need@ to determine
  84.           if x space remains on the page, and if not, causes an eject to
  85.           the next page.
  86.           \itempar\\need@ depends on \\okbreak which merely encourages a page
  87.           break at that point.  Its effect is dependent on its nearness to
  88.           the bottom of the page, and whether the text following the \\need
  89.           fits completely on the page or not.
  90. \NOTE  15: \\for provides a for-loop.  Parameter \#1 (\\fcount@) contains the
  91.           variable name; \#2 is the initial value of the variable; \#3
  92.           (\\fexit@) is the terminating value; \#4 (\\floop@) contains the
  93.           instructions to be done in the loop. The loop will not execute
  94.           unless the initial value (\#2) is less than or equal to the
  95.           terminating value (\#3). \\next@ is set to \\fnext@.
  96. \NOTE  16: \\fnext@ provides the looping capability for \\for. It executes
  97.           \\floop@ and then checks to see if \\fcount@ has reached the
  98.           terminating value.  If it hasn't, then \\fcount@ is incremented.  If
  99.           the terminating value has been reached, \\next@ is set to \\relax.
  100.           \\next@ is then entered and depending on its current meaning, either
  101.           the loop is repeated via \\fnext@, or \\relax ends the looping.
  102. \NOTE  17: \\uline\#1 makes a \\vbox containing \#1 with a horizontal rule .23em
  103.           under its baseline, and then creates an \\hbox containing the vbox
  104.           lowered by the amount necessary to place the baseline of \#1 in line
  105.           with the baseline of the current line of text.
  106. \section{START AND FINISH GROUP STRUCTURE}
  107. \NOTE  18: \\start\#1 and \\finish\#1 define local nestable blocks.  In the
  108.           event of any error, the error message is delayed until corrections
  109.           are complete.
  110. \NOTE 19: \\start\#1 uses \\{if}invalid@ to determine if \#1 is a valid
  111.           blockname. If it is, a block (group) is begun and \\blockname@
  112.           stores \#1 as the name of the current block. The control sequence
  113.           \\BEGIN\#1 is invoked and \\Error is called to print out any error
  114.           messages.
  115. \NOTE  20: \\finish\#1 calls \\{if}invalid@ to determine if \#1 is a valid
  116.           blockname. If it is valid, \\matchup@ is called to close block \#1.
  117.           \\Error is called to print out any error messages.
  118. \NOTE  21: \\{if}invalid@\#1 tests to see if the control sequence \\BEGIN\#1
  119.           has been defined.  If it has not been defined, it is ignored
  120.           and \\errset is called to store an error message.
  121. \NOTE  22: \\matchup@\#1 closes blocks as follows: if a \\finish is used when no
  122.           block currently exists, it is ignored. if a finish does not match
  123.           the current blockname, blocks are closed until either a match is
  124.           found or all blocks are closed.  The parameter is the parameter to
  125.           \\finish.
  126. \NOTE  23: \\done closes the current block.
  127. \section{GENERAL ERROR HANDLING}
  128. \NOTE  24: These macros are used for general purpose error handling.
  129.           \\errfalse clears the error status. \\errset assumes an argument of
  130.           an error message; any use of \\errset sets the error status and
  131.           produces an error message when \\Error is encountered.
  132. \section{DATE AND TIME MACROS}
  133. \NOTE  25: \\mon sets the current month with the current font.
  134. \NOTE  26: \\date sets the current date: \langle month\rangle
  135.                                          \langle day\rangle,
  136.                                          \langle year\rangle.
  137. \NOTE  27: \\hour sets the current time of day in 12 hour format:
  138.           \langle hour\rangle:\langle minutes\rangle \langle AM or PM\rangle.
  139. \section{INDENTSTYLE}
  140. \NOTE  28: The switch \\{if}indent acts as a flag to indicate when \\indentstyle
  141.           is being used.  This is used in \\indentstyle, \\noindentstyle, and
  142.           \\indentspace.
  143. \NOTE  29: \\indentstyle sets \\parindent to \\indentsize. If \\indentstyle is
  144.           already in effect, \\parskip is not changed. If \\indentstyle is
  145.           not already in effect, \\parskip is decreased by 5 points.
  146. \NOTE  30: \\noindentstyle sets \\parindent to zero points.  If \\indentstyle is
  147.           in effect, \\parskip is increased by 5 points, otherwise it is not
  148.           changed.
  149. \NOTE  31: \\indentspace will update \\parindent only if \\indentstyle is in
  150.           effect.
  151. \section{RAGGED MARGIN}
  152. \NOTE  32: \\fixmargin@ preserves the original \\rightskip.
  153. \NOTE  33: \\justify undoes the effects of \\raggedright by returning to the
  154.           original \\rightskip, and resetting the interword and intersentence
  155.           space to the default values.
  156. \NOTE  34: \\raggedright saves the original \\rightskip with \\fixmargin@, adds
  157.           some stretch to \\rightskip, and if \\tt is not in effect, fixes the
  158.           interword and intersentence spaces.
  159. \NOTE  35: \\tt@ is used in \\raggedright in the \\ifx comparison.  It is
  160.           necessary if the comparison is to succeed.
  161. \section{ITEM AND SUBITEM}
  162. \NOTE 36: \\itemset@ takes three parameters: \#1 specifies the left
  163.           indentation (in multiples of \\inset), \#2 should be the sum of the
  164.           left and right indentation (in multiples of \\inset), and \#3 is
  165.           the tag to be hung to the left of the item.  The line size is in
  166.           \\dimen@. \\parshape is used to build the paragraph.  The tag (\#3)
  167.           is hung to the left of the paragraph.
  168. \NOTE 37: \\itemlist\#1 is syntactically the same as \\item, however
  169.           \\itemlist preserves \\leftskip and \\right\-skip, and both the
  170.           left and right margins are indented by the value of \\inset. The
  171.           parameter contains the tag for the item.  Each time \\itemlist is
  172.           used, the subitem tag is reset, and the item tag is incremented if
  173.           appropriate.
  174. \NOTE  38: \\subitem\#1 is syntactically the same as \\itemitem, however left an
  175.           rightskip are preserved, and both the left and right margins are
  176.           indented by twice the value of \\inset. The parameter contains the
  177.           tag for the subitem. Each time \\subitem is used, the subitem tag
  178.           is incremented, if appropriate.
  179. \NOTE  39: \\itempar creates a paragraph identical to that created by \\itemlist
  180.           except it will have an empty tag.  It can be used for the second
  181.           paragraph of an item.
  182. \NOTE  40: \\subitempar creates a paragraph like that created by \\subitem, but
  183.           with an empty tag.
  184. \section{ITEM TAG AND SUBITEM TAG MACROS}
  185. \NOTE  41: The definition of a tag must do three things:
  186.               \inset1in\itempar (1) define a control sequence
  187.           \\reset[sub]items which will be used to restart tag allocation
  188.           between lists;
  189.               \itempar (2) restart tag allocation;
  190.               \itempar (3) define a control sequence \\[sub]itemtag to
  191.           produce a tag.
  192.           \inset.825in
  193.           \itempar\\icount@ (\\scount@) holds the value used to determine
  194.           the current item (subitem) tag for numbered and lettered tags.
  195.           \itempar\\idigit@ (\\sdigit@) is used with lettered tags to keep
  196.           track of how many times the item [subitem] tags have gone through
  197.           the alphabet without being reset.
  198. \NOTE 42: \\itemn@\#1 is used in the allocation of numbered tags. The
  199.           parameter is either \\icount@ or \\scount@.
  200. \NOTE  43: \\itemr@\#1 is used in the allocation of lower case Roman tags. The
  201.           parameter is either \\icount@ or \\scount@.
  202. \NOTE  44: \\itemR@\#1 is used in the allocation of upper case Roman tags.
  203.           The parameter is either \\icount@ or \\scount@.
  204. \NOTE  45: \\iteml@\#1\#2 is used in the allocation of lettered tags. If the
  205.           end of the alphabet is reached, it begins again with ``aa'' or
  206.           ``AA''.  The first parameter is either \\icount@ or \\scount@.  The
  207.           second parameter is either \\idigit@ or \\sdigit@.
  208. \NOTE  46: \\item@\#1,\#2,\#3 takes three parameters: \#1 is the initial value o
  209.           \\icount@ (item counter), \#2 is the value of \\idigit@ which  is
  210.           used to print out the appropriate number of letters when using
  211.           letters as tags, and \#3 is the definition of the \\itemtag.  It
  212.           defines \\resetitems to be the initialization of \\icount@ and
  213.           \\idigit@.
  214. \NOTE  47: \\itm does not take a parameter.  It uses the current \\itemtag
  215.           as the parameter to \\itemlist.  If the \\itemtag is numbers or
  216.           letters, a period is appended to the tag.
  217. \NOTE  48: \\subitem@ is similar to \\item@.
  218. \NOTE  49: \\sitm is the subitem macro equivalent to \\itm for item.
  219. \NOTE  50: The defaults are \\numbereditems and \\letteredsubitems. The
  220.           execution of these macros defines \\itemtag, \\subitemtag,
  221.           \\resetitems, and \\resetsubitems.
  222. \section{NOTE AND WARNING MACROS}
  223. \NOTE  51: \\BEGINnote defines the blockname ``note'' and sets the indentation
  224.           at twice the left and right skip amounts.
  225. \NOTE  52: \\BEGINwarning defines the blockname ``warning,'' sets the indentatio
  226.           to twice the left and rightskip amounts, and places a horizontal
  227.           rule above the text.  \\ENDwarning places a horizontal rule below
  228.           the text.
  229. \NOTE  53: \\marginrule\#1 defines an \\hrule limited by \\leftskip and
  230.           \\rightskip.  Its only parameter specifies the height of the rule.
  231. \section{VERBATIM MODE}
  232. \NOTE  54: In verbatim mode, all characters except (\\), ($\{$) and ($\}$)
  233.           are treated
  234.           verbatim. Characters that cannot be extracted from the current font
  235.           are taken from the math font and given a fixed space equal to the
  236.           space of the current font.
  237. \section{LUMPLINE AND LUMPSPACE MACROS}
  238. \NOTE  55: These macros make the verbatim mode use less memory. Multiple lines
  239.           and spaces are lumped together to make one large glob of glue
  240.           rather than many small globs.
  241.           \itempar The carriage return is made into an active character, and
  242.           given the meaning of \\lumpline@. \\lumpline@ accumulates
  243.           sequential carriage returns into one lump of vertical glue in
  244.           \\skip@.
  245.           \itempar ``\\{\spacechar}'' is made into an active character, and
  246.           given the meaning of \\lumpspace@.  \\lumpspace@ accumulates
  247.           sequential spaces into one lump of horizontal glue in \\skip@.
  248. \goodbreak
  249. \section{PAGE CONTROL MACROS}
  250. \NOTE  56: \\newpage first balances multi-column format which transfers the
  251.           contents of \\box 255 to \\contrb@, so it always looks like the
  252.           page is empty immediately afterwards. The box \\contrb@ is checked
  253.           to see if the page is really empty.
  254.           \itempar If \\newpage occurs at the bottom of a full page, the
  255.           \\null\\vfill remains in recent contributions and causes an extra
  256.           page to be ejected.  The workaround is to insert an \\eject in the
  257.           document just before the \\newpage (or the macro containing the
  258.           \\newpage).
  259.           \itempar The same problem occurs with \\evenpage and \\oddpage, and
  260.           the same workaround is effective.
  261. \section{HEADING AND FOOTING MACROS}
  262. \NOTE  57: Headlines and footlines are constructed as follows:
  263.           \inset1in
  264.           \itempar (1) under normal conditions the centered heading or
  265.           footing is centered, but in the event that one (or more) of the
  266.           headings or footings are too wide, space is distributed if possible
  267.           so there is no overlap. The macro triplehead@ does this.
  268.           \itempar (2) inside and outside headings and footings have priority
  269.           over left and right headings and footings.  \\buildline takes care
  270.           of this.
  271.           \inset.825in
  272.           \itempar Notice that if the tokens in an \\hbox have width 0pt, it
  273.           is assumed they are empty.
  274.           \itempar The macros and token registers associated with headings
  275.           and footings should be used near forced page breaks or at the
  276.           begining of the document. TeX scans ahead when building a page, so
  277.           the use of these macros could affect the previous page.
  278. \NOTE  58: \\buildline decides which tokens will be on the left and right of
  279.           the headline or footline that is being constructed.  \\lft and \\rght
  280.           hold the numbers of the boxes containing the tokens to be placed on
  281.           the left and right sides of the line. They are initialized to the
  282.           boxes for \\leftheading and \\rightheading. If the box containing the
  283.           \\insideheading (\\box3) is not empty, then for an odd page \\lft is
  284.           set to 3, and for an even page \\rght is set to 3.
  285.           \itempar If the box containing the \\outsideheading (\\box4) is not
  286.           empty, then for an odd page \\rght is set to 4, and for an even
  287.           page \\lft is set to 4.
  288.           \itempar \\triplehead is called to actually construct the line.
  289. \NOTE  59: \\triplehead\#1\#2\#3 requires three parameters. \#1 is the number of
  290.           the box that is to go to the left, \#2 is the box number for the
  291.           center, and \#3 is the box number for the right.  \\skip@ is the glue
  292.           to go between the left and center boxes, and \\skip@ii is the glue
  293.           to go between the center and right boxes.
  294.           \itempar If the width of the left box is greater than the width of
  295.           the right box, \\skip@ii is increased by the difference, otherwise,
  296.           \\skip@ is increased by the difference.
  297.           \itempar The line is then built by stringing together the boxes and
  298.           glue.
  299. \NOTE  60: \\loadbox\#1\#2 takes two parameters: \#1 is the box number, \#2 is t
  300.           token list to be put in the box.
  301. \NOTE  61: \\headline checks to see if headings are turned on or off.  If on,
  302.           it loads the appropriate boxes with the various heading token
  303.           lists and calls \\buildline. If off, it adds horizontal glue, and
  304.           if \\suspendheading is in effect, updates the \\headcount.
  305. \NOTE  62:  \\footline is similar to \\headline.
  306. \section{BOX MACROS}
  307. \NOTE  63: \\boxit\#1 takes as its parameter the text to be placed in the box,
  308.           and can be used when a real box is wanted, e.g.,
  309.           \\setbox0\\boxit$\{${$\ldots$}$\}$.
  310.           \\boxit uses \\halign to center the lines of text, separated by \\cr,
  311.           within the box.
  312.           \itempar The value of \\boxline determines the thickness of the
  313.           rule around the box.  The value of \\boxspace determines the amount
  314.           of space between the rule and the text.
  315. \NOTE  64: \\centerbox\#1 takes as its parameter the text to be boxed, and then
  316.           uses \\centerline to center the box resulting from \\boxit\#1. The box
  317.           is separated from surrounding text by \\abovedisplayskip and
  318.           \\belowdisplayskip.
  319. \NOTE  65: \\textbox\#1 takes as its parameter the text to be boxed.  It places
  320.           the boxed text in the current line (or begins a new paragraph if
  321.           encountered in vertical mode) with the baseline of the enclosed
  322.           text lined up with the baseline of the line.
  323. \section{HP2680A and HP2688A COPY CONTROL MACROS}
  324. \NOTE  66: These commands control the number of copies per page.  Owing to the
  325.           synchronization problems associated with TeX, these should only be
  326.           used near forced page ejects or at the begining of a document.
  327.           \itempar \\globalspecial writes the parameter to the postamble of
  328.           the PIF file.
  329.           \itempar \\copycnt contains the number of the register that the PIF
  330.           server will look in to find the number of copies desired.
  331.           \itempar \\oldcopy contains the number of copies desired.  The
  332.           default is two, so if \\copieson is invoked before the user has
  333.           used \\copies\langle n\rangle, two copies will be generated.
  334. \section{HP2680A and HP2688A LOGICAL PAGE CONTROL (LPC) MACROS}
  335. \NOTE  67: \\lpcount@ holds the number of the register to be interpreted
  336.           by the PIF driver for explicit logical page control.
  337.           \itempar\\nextlp@ holds the page control number to be put into
  338.           \\count\\lpcount@.
  339.           \itempar These macros avoid the synchronization problems of TeX by
  340.           interjecting a page eject at an appropriate time.  At the beginning
  341.           of the document and after each \\shipout, the ``empty@'' flag is set
  342.           to true.
  343.           \itempar If an LPC macro occurs when the ``empty@'' flag is true, \\ne
  344.           is updated, its value is put into \\count\\lpcount@, and the flag
  345.           is set to false.
  346.           \itempar If an LPC macro occurs when the ``empty@'' flag is false, \\n
  347.           is updated, but the value in the register \\count\\lpcount@ is not
  348.           changed. After the next shipout, \\count\\lpcount@ is updated by
  349.           the output routine.
  350.           \itempar The codes for \\lpreset and \\lpexit will, if left alone, onl
  351.           for one page.
  352. \section{TABLE MACROS}
  353. \NOTE  68: The table macros are complex.  It is recommended that anyone
  354.           wanting to understand how they work examine the LOG file of
  355.           a table made with \\tracingmacros=1 and \\tracingcommands=2.
  356.           \itempar The table macros use unallocated dimension and token
  357.           registers to store the column specifications.  New dimensions or
  358.           tokens should not be allocated between the \\tableformat and the
  359.           last \\tablerow or \\tablebar in a table.  If any are allocated the
  360.           result will be a very strange looking table and a TeX error.  If
  361.           too many columns, dimensions, tokens or inserts are allocated, an
  362.           error message is given and the registers are used anyway.
  363.           \itempar A row is processed in sections.  \\parseline@ takes
  364.           sections of the parameter to \\tableformat or \\tablerow.  Each
  365.           section is delimited by a ``\~{}''.  \\parsecol@ takes sub-sections
  366.           of the section where each sub-section is delimited by a ``$|$''.
  367.           After a sub-section is processed, the next sub-section is fetched
  368.           until the end of a section is reached. The next section is then
  369.           fetched and processed until the end of the original parameter to
  370.           \\tableformat or \\tablerow is reached.
  371.           \itempar \\span is temporarily redefined during the execution of
  372.           either a \\tablerow or \\tablebar macro to allow spanning of
  373.           multiple columns.
  374.           \itempar The standard table specifications are \\leftline,
  375.           \\rightline, \\centerline and (for internal columns) \\paragraph.
  376.           You can also make your own. There are only two rules:
  377.           \inset1in
  378.           \itempar(1) your macro will have one parameter (the text)
  379.           \itempar(2) your macro will yield a box of width \\hsize.
  380.           \inset.825in
  381. \NOTE 69: \\uptoks@ increments \\cntA@, used as a pointer to a token register
  382.           to hold column alignment specifications, and \\cntB@, used as a
  383.           pointer to a dimension register used to hold column width specifi\-%
  384.           cations. If too many token registers are used, an error message is
  385.           printed, and processing continues.
  386. \NOTE  70: \\bump@ increments \\cntC@, which contains the number of columns
  387.           processed in the current \\tablerow or \\tablebar. If the total number
  388.           of columns specified in the \\tableformat has not yet been processed,
  389.           then \\cntC@ is incremented, and \\uptoks@ is called to increment the
  390.           pointers to the registers that hold the column specifications.
  391. \NOTE 71: \\tableformat\#1 has as its parameter the description of the table
  392.           format.  The alignment for the entire table is given first,
  393.           followed by the formats for each column.  A column format consists
  394.           of its alignment followed by its width.  A ``$|$'' separates the
  395.           table format from the column formats, and each column format from
  396.           the next.
  397.           \itempar \\tableformat first calls \\tablelet with the three
  398.           parameters \\just@, \\just@, and \\relax.
  399.           \itempar Next, \\parse@ (which has been assigned the meaning of
  400.           \\parseline@) is called and sent one parameter, which is delimited
  401.           by ``\lower4pt\hbox{\~{}}''. This effectively sends the contents
  402.           of the parameter of \\tableformat up to the first
  403.           \lower4pt\hbox{\~{}} to \\parse@ (\\parseline@). The \\done@ is
  404.           an undefined control sequence used to mark the end of the
  405.           specifications in the \\tableformat.
  406. \NOTE 72: \\tablerow\#1 is similar to \\tableformat.  Its parameter is a list
  407.           of the contents for each column of the row.  Each column must start
  408.           and terminate with either a ``$|$'' for a visible bar, or a
  409.           ``\lower4pt\hbox{\~{}}'' for an invisible bar.
  410.           \itempar The parameters sent to \\tablelet are: \\bbar@, \\wbar@,
  411.           and \\endrow@.
  412. \NOTE  73: \\tablebar\#1 sets horizontal rules across the table.  It resets
  413.           \\topstrut, \\botstrut, and \\table\-space, and then passes its
  414.           parameter to \\tablerow.  Its parameter is a list of column
  415.           contents, with each column indicated as for \\tablerow.  A
  416.           column can be empty, contain a \\vrule, or contain \\tbar.
  417. \NOTE  74: \\tablelet requires three parameters.  The first is assigned to the
  418.           control sequence \\b@, the second to \\w@, and the third to \\f@.
  419.           \\CntA@, \\CntB@, and \\CntC@ are initialized.  \\parse@ is assigned
  420.           the meaning of \\parseline@. If currently in horizontal mode,
  421.           vertical mode is entered; if in vertical mode, interline glue is
  422.           inhibited.
  423. \NOTE  75: \\just@\#1 is never invoked directly.   The control sequences \\b@
  424.           and \\w@ are \\let to be \\just@ in \\tablelet when \\tablelet is
  425.           called from \\tableformat.  \\just@ is invoked by \\parsecol@ the
  426.           first time \\parsecol@ is entered. The parameter to \\just@ is the
  427.           alignment specification for the table.
  428.           \itempar \\just@ assigns the control sequences \\b@ and \\w@ the
  429.           meaning of \\tform@, and initializes \\maxcol@ to 0.  The control
  430.           sequence \\tablejust@ is assigned the table alignment
  431.           specification (\#1).
  432. \NOTE  76: \\tform@\#1 passes its parameter, which is the set of specifications
  433.           for a column, on to \\tform@@ with a \lower 4pt\hbox{\~{}}
  434.           deliminating the parameter.
  435. \NOTE  77: \\tform@@\#1\#2\lower 4pt\hbox{\~{}} updates the pointers to the
  436.           registers to be used for storing column specifications, puts the
  437.           column alignment (\#1) into the current token register, and the
  438.           column width (\#2) into the current dimension register.  Then
  439.           \\maxcol@ is incremented to count the column just completed.
  440. \NOTE  78: \\bbar@\#1 begins a row that starts with a visible vrule.  The
  441.           parameter is empty.
  442. \NOTE  79: \\wbar@\#1 begins a row that starts with an invisible vrule.  The
  443.           parameter is empty.
  444. \NOTE  80: \\beginrow@\#1 reassigns \\b@ and \\w@ the meanings of \\vbar@ and
  445.           \\ibar@ respectively. The parameter is empty.
  446.           \itempar Box 0, an \\hbox that will contain the row, is begun with
  447.           a \\bgroup, and the assignments that should hold within the box are
  448.           made.
  449. \NOTE  81: \\endrow@ finishes Box 0 and aligns the resulting box according to
  450.           \\tablejust@.
  451. \NOTE  82: \\vbar@\#1 adds a column entry that terminates with a visible \\vrule
  452.           The parameter contains the column entry.
  453. \NOTE  83: \\ibar@\#1 adds a column entry that terminates with an invisible
  454.           rule. The parameter contains the column entry.
  455. \NOTE  84: \\cs@\#1 determines if a column entry (\#1) spans multiple columns,
  456.           and invokes \\span@ with the appropriate parameters.
  457. \NOTE 85: \\parseline@\#1\lower 4pt\hbox{\~{}} is called by \\tableformat and
  458.           \\tablerow (and indirectly by \\tablebar).  Its parameter is the
  459.           part (section) of the parameter to the calling macro terminated by
  460.           the first occurrence of ``\lower 4pt\hbox{\~{}}'' .  If the
  461.           parameter is \\done@, then processing is complete, and \\parse@ is
  462.           assigned the current meaning of \\f@, which is \\relax if
  463.           \\parseline@ was called from \\tableformat, or \\endrow@ if
  464.           \\parseline@ was called from \\tablerow.
  465.           \itempar If processing is not done, \\p@ss is assigned the meaning
  466.           of \\parsecol@, and then \\p@ss is invoked and its parameter is
  467.           that part (sub-section) of the parameter to \\parseline@ up to the
  468.           first occurrence of ``$|$''. \\done@ is an end of processing
  469.           indicator. \\parse@ is invoked and, depending on its current
  470.           assigned meaning, either terminates processing of this
  471.           \\tableformat or \\tablerow parameter, or takes the next section of
  472.           the parameter of the \\tableformat or \\tablerow terminated by
  473.           \lower 4pt\hbox{\~{}} as its parameter.
  474. \NOTE  86: \\parsecol@\#1 is called by \\parseline@ and has as its parameter tha
  475.           part (sub-section) of the parameter to \\parseline@ up to the next
  476.           occurrence of $|$.  It defines the macro \\parsemode@: if we are on
  477.           the last column, then the currently assigned value of \\w@
  478.           (\\tform@ or \\ibar@, depending on whether a \\tableformat or a
  479.           \\tablerow is being processed) is invoked, and \\p@ss becomes
  480.           \\lastp@ss; if we are not on the last column, then \\b@ (which is
  481.           either \\tform@ or \\vbar@) is invoked; in either case, \\p@ss is
  482.           called again and will either terminate processing or get the next
  483.           section to be processed.
  484. \NOTE  87: \\span@\#1\#2 sets a box spanning the required number of columns and
  485.           containing the text in the parameter.  \\hsize and \\z@ are set to
  486.           the width and alignment specifications respectively of the first
  487.           column spanned.  The pointers are then incremented once for each
  488.           column spanned, and the width of each column plus the width of a
  489.           vertical bar is added to the \\hsize for each column spanned. The
  490.           first parameter is the integer following \\span, and the second is
  491.           the remainder of the column contents.
  492. \section{SECTION AND HEADING MACROS}
  493. \NOTE  88: These macros are used for head or section level control.
  494.           \itempar\\basehead is the zero pointer value for the four pointers
  495.           to the head counters. The head counters count the number of
  496.           current headings at each heading level.
  497.           \itempar\\headlevel keeps track of the level of the current
  498.           heading.
  499.           \itempar To add a fifth level, do the following:
  500.           \inset1in
  501.           \itempar(1) Change the ``\\advance\\count10 by~4'' command to
  502.           ``\\advance\\count10 by~5''.  This allocates the counters for the
  503.           level number.
  504.              \itempar(2) Change ``\\ifnum\\hdlevel$<$4 '' to
  505.           ``\\ifnum\\hdlevel$<$5'' in the \\sethead@ macro.
  506.              \itempar(3) Allocate a new token register, \\fifthlevelhead, and
  507.           define a corresponding \\headE@:\hfil\break
  508.           \\def\\headE@$\{$\\head5\\the\\fifthlevelhead$\}$.
  509.              \itempar(4) Modify the \\level macro so that it includes
  510.           \\headE@.
  511.              \itempar(5) Load \\fifthlevelhead with some appropriate tokens.
  512.              \inset.825in
  513. \NOTE  89: \\setlevelno\#1 has one parameter: the levelnumber to be established.
  514.           This can be up to 4 numbers, separated by periods. The level number
  515.           and the pointer to the head counters are initialized.
  516.           \itempar``.-1.'' is appended to the parameter to act as an end of
  517.           parameter signal.
  518. \NOTE  90: \\sethead@\#1. has as its parameter one of the num\-bers in the
  519.           parameter to \\setlevelno.  The first num\-ber it receives is put into
  520.           the head counter for the first level. The second number goes into
  521.           the head counter for the second level, etc.  Processing is
  522.           completed when -1 is received as a parameter, or when 4 levels have
  523.           been done.
  524. \NOTE  91: \\head\#1 is called indirectly by \\level via \\headA@, or \\headB@,
  525.           etc.  It oversees adjusting the \\levelno according to the level of
  526.           the new heading. Its parameter is the level of the new
  527.           heading.
  528.           \itempar If the new heading is on a level inferior to the current
  529.           heading, \\uplevel@ is called, otherwise \\headlevel is set to the
  530.           level of the new heading and that head counter for that level is
  531.           incremented.
  532.           \itempar\\head@ is called to update \\levelno.
  533. \NOTE  92: \\uplevel@\#1 does what is necessary to add a level that has a
  534.                 higher
  535.           number than the current level.  \#1 is the level of the new heading.
  536. \NOTE  93: \\head@ defines \\levelno.
  537. \NOTE  94: These allocate token registers for each level description, and
  538.           define a corresponding \\headA@ (or \\headB@ etc.) that calls \\head
  539.           with the appropriate parameter, and accesses the tokens for that
  540.           headlevel.
  541. \NOTE  95: \\level\#1\#2 takes two parameters: \#1 is the level of the heading,
  542.           and \#2 becomes the definition of \\title.  A case statement is
  543.           used to invoke the appropriate choice of \\headA@, \\headB@, etc.
  544. \section{CONTENTS FILE MACROS}
  545. \NOTE  96: ``\\content@'' can now be written with \\write
  546. \NOTE  97: \\ctswrite\#1 writes its parameter into a file along with the current
  547.           page number.  If the file does not already exist, one is created.
  548.           When the file is read at a later time, @ will not be a character.
  549.           \\{\_} is redefined so that it can be read from the contents file.
  550.           \\content@ is defined with @ no longer a character so that it can be
  551.           read from the contents file.
  552. \NOTE  98: \\contents adds the table of contents if a contents file was
  553.           created.
  554. \section{FOOTNOTES AND INSERTIONS}
  555. \NOTE  99: The \\vfootnote\#1 of PLAIN has been modified to accommodate
  556.           multi-column format by the insertion of \\realhsize to restore the
  557.           original \\hsize and by adding ``1\\baselineskip'' to remove any
  558.           glue from \\baselineskip.
  559. \NOTE 100: \\note generates footnotes with sequential numbers.
  560. \NOTE 101: \\midinsert has been changed from the definition in PLAIN by
  561.          the insertion of \\p@gefalse.
  562. \NOTE 102: \\@ins has been changed from the definition in PLAIN by adding a
  563.           return to the normal \\hsize and \\vsize.
  564. \NOTE 103: The \\endinsert of PLAIN has been modified. The ``room left on page''
  565.           calculation has been expanded to handle multi-column format:  if
  566.           there is room, the columns are balanced and the insertion is
  567.           appended. The penalty (first item in the \\insert) is set to -100 if
  568.           the insertion cannot fit on the current page, this keeps the page
  569.           from stretching if the insertion can't fit on the page.
  570. \section{COLUMN MACROS}
  571. \NOTE 104: The column macros and output routines are interrelated. Every time
  572.           the number of columns changes, a false output routine is invoked.
  573.           This routine takes the current page (and splits it up if necessary)
  574.           and appends it to the contrib box. The \\hsize is then reduced (or
  575.           restored) and the \\vsize is multiplied (or restored). Then, to
  576.           every insert which was not void during the false output routine a
  577.           null insert is made. This restores the page goal (in case there are
  578.           no bona fide insertions, one insertion is always made, it is called
  579.           \\hacker@). A new page total is then calculated from the height of
  580.           the contrib box. The two macros employed to do this work are
  581.           \\balance@ and \\newtotal@. Under no circumstances should the one be
  582.           used without the other.
  583. \NOTE 105: \\balance invokes the false output routine which has the effect of
  584.           balancing the columns if in multi-column mode.  The page goal is
  585.           then updated by \\newtotal@.
  586. \NOTE 106: \\balance@ invokes the false output routine by setting \\ifreal@ to
  587.           false, and forcing an eject.
  588. \NOTE 107: \\newtotal@ restores the page total.
  589. \NOTE 108: \\multicol@\#1 is called by the \\BEGIN command for multi-column
  590.           format.  It takes as its only parameter the number of columns
  591.           requested.  It provides error checking and ignores the command
  592.           if already in multi-column mode. If the command is legal, then
  593.           the current page is balanced, and the \\hsize and \\vsize are
  594.           adjusted. The insertion registers are modified, the page total
  595.           is adjusted, and stretch is added to \\baselineskip.
  596. \section{OUTPUT ROUTINES}
  597. \NOTE 109: The output routines are complex.  It is recommended that anyone
  598.           wanting to understand how they work examine the LOG file of a
  599.           file with \\tracingmacros=1 and \\tracingcommands=2.
  600.           \itempar There are two types of output routines:  \\realoutput@
  601.           produces a \\shipout and \\fakeoutput@ does not.
  602.           \itempar The \\toks registers associated with each insert are now
  603.           reserved (as were \\dimen, \\skip and \\count). Any tokens in these
  604.           registers will be destroyed when the \\output routine is active.
  605. \NOTE 110: \\realoutput puts the current page into \\out@.  If currently in
  606.           one-column mode, it goes in directly, otherwise the current page
  607.           is first split into columns.  Box 255 is then set to \\contrb@ with
  608.           \\old@ appended to it.  The glue for insertions, \\hsize, \\vsize,
  609.           \\leftskip, and \\rightskip are returned to normal for the
  610.           \\shipout. After the \\shipout, the flags and counters for the
  611.           logical page macros are updated.
  612. \NOTE 111: \\fakeoutput takes the current page, balances it if necessary, and
  613.           puts it into \\out@.  \\out@ is then appended to \\contrb@.
  614.           \itempar If any column must be shorter due to balancing, it ought
  615.           to be the rightmost. The \\vsplit primitive, however, will usually
  616.           make the rightmost column longer. To avoid this problem, columns
  617.           are split a little more than 1/2 or 1/3 down. Experimentation shows
  618.           that adding 1.16667 baselines to the total height for 2 columns,
  619.           and adding 2 baselines to the total height for 3 columns affords
  620.           the greatest probability of an aesthetic break.
  621. \NOTE 112: The ``@'' is no longer a letter.
  622.